$(document).ready(function(){
	$(document).on("click","#managePerson",function()
	{	
		$.post("managePerson",
		function(data)
		{
			$("#adminbody").empty();
			$("#adminbody").append(data);
		});//post

	});//on
	$(document).on("click","#updatePerson",function()
	{	
		$.post("updatePerson",
		{
			UUser:$("#UUser").val(),
			UName:$("#UName").val(),
			UEmail:$("#UEmail").val(),
			UPassword:$("#UPassword").val()
		},
		function(data)
		{
			alert(data);
			window.location="admin.jsp";
		});//post
	});//on
	$(document).on("click","#deletePerson",function()
	{	
		$.post("deletePerson",
		{
			UUser:$("#UUser").val()
		},
		function(data)
		{
			alert(data);
			window.location="admin.jsp";
		});//post
		
	});//on
	$(document).on("click","#manageEnterprise",function()
	{	
		$.post("manageEnterprise",
		function(data)
		{
			$("#adminbody").empty();
			$("#adminbody").append(data);
		});//post

	});//on
	$(document).on("click","#updateEnterprise",function()
	{	
		$.post("updateEnterprise",
		{
			EUser:$("#EUser").val(),
			EName:$("#EName").val(),
			EEmail:$("#EEmail").val(),
			EPassword:$("#EPassword").val(),
			EAddress:$("#EPassword").val()
		},
		function(data)
		{
			alert(data);
			window.location="admin.jsp";
		});//post
	});//on
	$(document).on("click","#deleteEnterprise",function()
	{	
		$.post("deleteEnterprise",
		{
			UUser:$("#EUser").val()
		},
		function(data)
		{
			alert(data);
			window.location="admin.jsp";
		});//post
		
	});//on
});
